<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>小米官网图片的悬浮效果</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .box {
        width: 1400px;
        height: 550px;
        margin: 50px auto;
        border: 1px solid #ccc;
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .box img {
        width: 310px;
        height: 480px;
        cursor: pointer;
        transition: all .2s linear;
    }

    .box img:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    }
</style>

<body>
    <div class="box">
        <img src="../img/bg/1_05.jpg" alt="">
        <img src="../img/bg/2_05.jpg" alt="">
        <img src="../img/bg/3_05.jpg" alt="">
        <img src="../img/bg/4_05.jpg" alt="">
    </div>
</body>

</html>